package com.mitaotao._1_语法._3_分支._3_if判断;

import java.util.Scanner;

public class _05_能否同时被3和5整除_1 {
    public static void main(String[] args) {
        //判断一个数能否同时被3和5整除
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入需要判断的数字：");
        int num = scanner.nextInt();

        if (num%3==0 && num%5==0){
            System.out.println("该数字能被3和5整除");
        }
        else{
            System.out.println("该数字不能同时被3和5整除");
        }
        scanner.close();
    }
}
